Currently, commonly used hard disks include mechanical hard disks and solid state disks. Mechanical hard disks tend to have read-write errors as affected by temperature and vibration, and solid state disks also tend to have read-write errors due to their bad block rates and inherent limitation on the number of times of erasure. Although a hard disk is capable of correcting errors, it can only correct erroneous data of few erroneous bits using its own error correction algorithm, and its error correction capability is limited.
In the prior art, when the erroneous data has excessive erroneous bits and the hard disk cannot correct errors using its own error correction algorithm, a storage controller mostly uses a RAID (Redundant Array of Independent Disks, redundant array of independent disks) algorithm to correct erroneous data, and performs a re-creation or formatting operation to recover hard disk data. If another hard disk in a hard disk array is erroneous in the re-creation operation process, the data in the hard disk is irrecoverable while a formatting operation requires reading and formatting of data on an entire track and requires data writing twice. The first time of writing data is to write the data on the entire track (including the data recovered by using a RAID algorithm and other data on the track that includes the erroneous data) into a reserved area, and the second time of writing data is to write the data on the entire track onto the formatted track, which leads to complex operations and consumes much time. In addition, the reserved area is used to store hard disk parameters and configuration information, and it is considerably risky to perform a data writing operation for the first time.